﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CqusInfo.RAL.Permissions;

namespace CqusInfo.DAL.Permissions.Inteface
{
    public interface IUser_FunctionDAL
    {
        /// <summary>
        /// 得到表的总条数
        /// </summary>
        /// <param name="isDel">true：已删除 false：未删除</param>
        /// <returns></returns>
        Int32 GetCounts(bool isDel);

        /// <summary>
        /// 新增数据
        /// </summary>
        /// <param name="model">数据集</param>
        /// <returns>1：成功 0：失败</returns>
        Int32 Add(User_FunctionModel model);

        /// <summary>
        /// 修改数据
        /// </summary>
        /// <param name="ufId">功能ID</param>
        /// <param name="model">数据集</param>
        /// <returns>1：成功 0：失败</returns>
        Int32 Update(string ufId, User_FunctionModel model);

        /// <summary>
        /// 删除数据，包括彻底删除和伪删除
        /// </summary>
        /// <param name="ufId">信息ID</param>
        /// <returns>1：成功 0：失败</returns>
        Int32 Delete(string ufId);

        /// <summary>
        /// 查询具体信息
        /// </summary>
        /// <param name="ufId">查询ID</param>
        /// <returns>List<FunctionModel></returns>
        List<User_FunctionModel> Query(string ufId);

        /// <summary>
        /// 查询所有信息
        /// </summary>
        /// <param name="page">页数，第几页 需减一</param>
        /// <param name="takeItem">每页显示的数目</param>
        /// <returns>List<FunctionModel></returns>
        List<User_FunctionModel> Query(Int32 page, Int32 takeItem);
    }
}
